import express from 'express';
import GroupController from '../controller/groupCtrl.js';

const router = express.Router();

// Group management routes
router.get('/groups/page/:page', GroupController.getList);
router.get('/groups/:id', GroupController.getById);
router.post('/groups', GroupController.create);
router.put('/groups/:id', GroupController.update);
router.delete('/groups/:id', GroupController.delete);

// Group membership routes
router.post('/groups/:id/join', GroupController.join);
router.post('/groups/:id/leave', GroupController.leaveGroup);

export default router; 